package com.thread.test07;

/**
 * @author bin
 * @date 2025 - 03 -11
 **/
public class MyThread extends Thread{
    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            if (i % 10 == 0){
                Thread.yield();
            }
            System.out.println(Thread.currentThread().getName() + " : " + i);
        }
    }
}
